﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace JzSport.WebApp.Init
{
    public partial class TestRegex : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            bool b32 = System.Text.RegularExpressions.Regex.IsMatch("1", @"^[\u4e00-\u9fa5_a-zA-Z0-9]{1,12}");
            bool b22 = System.Text.RegularExpressions.Regex.IsMatch("", @"^[\u4e00-\u9fa5_a-zA-Z0-9]{1,12}");
            bool b1 = System.Text.RegularExpressions.Regex.IsMatch("中文abc", @"^[\u4e00-\u9fa5_a-zA-Z0-9]{5,12}");
            bool b2 = System.Text.RegularExpressions.Regex.IsMatch("肥猴", @"^[\u4e00-\u9fa5_a-zA-Z0-9]{1,12}");
            bool b3 = System.Text.RegularExpressions.Regex.IsMatch("_中文_abc", @"^[\u4e00-\u9fa5_a-zA-Z0-9]{6,12}");
            bool b4 = System.Text.RegularExpressions.Regex.IsMatch(".中文_abc", @"^[\u4e00-\u9fa5_a-zA-Z0-9]{6,12}");
            bool b5 = System.Text.RegularExpressions.Regex.IsMatch("中文_a.bc", @"^[\u4e00-\u9fa5_a-zA-Z0-9]{6,12}");
        }
    }
}